package com.hl.controller;

import com.hl.service.serviceImpl.ChargeServiceImpl;
import com.hl.service.serviceImpl.ConsultproblemServiceImpl;
import com.hl.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author：王祖威
 * @Date ：2024/9/11 15:25
 */
@RestController
@RequestMapping("/consultproblem")
public class ConsultproblemController {
    @Autowired
    private ConsultproblemServiceImpl consultproblemServiceImpl;


    @GetMapping("/find")
    public R findAll(){
        return R.success(consultproblemServiceImpl.findAll());
    }

    @GetMapping("/findlike")
    public R findlike(String name){
        return R.success(consultproblemServiceImpl.findlike(name));
    }

    @DeleteMapping("/delete")
    public R del(Long id){
        return R.success(consultproblemServiceImpl.deleteByPrimaryKey(id));
    }






}
